{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[\"Invalid URL 'http:/smt-app-stg.pingan.com.cn/nantongsmt/indemnificationHousr/getList.do'\",\n",
       " 'No schema supplied. Perhaps you meant http://http:/smt-app-stg.pingan.com.cn/nantongsmt/indemnificationHousr/getList.do?']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "import re\n",
    "err = \"Invalid URL 'http:/smt-app-stg.pingan.com.cn/nantongsmt/indemnificationHousr/getList.do': No schema supplied. Perhaps you meant http://http:/smt-app-stg.pingan.com.cn/nantongsmt/indemnificationHousr/getList.do?\"\n",
    "errType, errInfo = err.split(\": \")\n",
    "errType = errType.split('')\n",
    "# errType = re.compile(('\\S+[\" \"])[\" \"]')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Invalid URL'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ss = \"Invalid URL 'http:/smt-app-stg.pingan.com.cn/nantongsmt/indemnificationHousr/getList.do'\"\n",
    "\" \".join( ss.split(\" \")[:-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "88.使用正则表达式匹配出<html><h1>www.baidu.com</html>中的地址\n",
    "a=\"张明 98 分\"，用 re.sub，将 98 替换为 100\n",
    "89.正则表达式匹配中(.*)和(.*?)匹配区别？\n",
    "90.写一段匹配邮箱的正则表达式"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
